/// 创建人： Created by zhaolong
/// 创建时间：Created by  on 2020/7/23.
///
/// 创建人： Created by zhaolong
/// 创建时间：Created by  on 2020/9/25.
///
/// gongzhonghao biglead
/// https://study.163.com/instructor/1021406098.htm
/// https://blog.csdn.net/zl18603543572
/// https://www.toutiao.com/c/user/token/MS4wLjABAAAAYMrKikomuQJ4d-cPaeBqtAK2cQY697Pv9xIyyDhtwIM/

class NewsBean {
  int id;
  String title;
  String createTime;
  String createUserName;

  String collectType;

  String coverImgUrl;
  String detailUrl;
  String categoryName;
  String shareUrl;

  String bannerImgUrl;

  /// 视频
  String videoUrl;

  /// 阅读量
  int readCount;
  int pariseCount;
  int collectCount;

  /// 是否点赞
  bool parise;

  ///是否收藏
  bool collect;
  int isTop;
  int collectId;

  NewsBean();

  NewsBean.fromJson(Map<String, dynamic> map) {
    this.id = map["id"];
    this.collectId = map["collectId"] ?? 0;
    this.title = map["title"];
    this.createTime = map["createTime"];

    this.coverImgUrl = map["coverImgUrl"];
    this.detailUrl = map["detailUrl"];
    this.categoryName = map["categoryName"];
    this.shareUrl = map["shareUrl"];

    this.bannerImgUrl = map["bannerImgUrl"];

    this.collectType = map["collectType"] ?? "news";

    this.videoUrl = map["videoUrl"];
    this.readCount = map["readCount"];
    this.parise = map["parise"];
    this.isTop = map["isTop"] ?? 1;
    this.collect = map["collect"] ?? false;

    this.pariseCount = map["pariseCount"] ?? 0;
    this.collectCount = map["collectCount"] ?? 0;

    this.createUserName = map["createUserName"];
  }
}
